---
order: 5
function_title_template: '[language]''s [function] in JavaScript'
human: PHP
packageType: extension
inspiration_urls:
  - >-
    <a href="https://php.net/manual/en/book.strings.php">the PHP string
    documentation</a>
  - >-
    <a
    href="https://github.com/php/php-src/blob/master/ext/standard/string.c#L5338">the
    PHP string source</a>
  - >-
    <a
    href="https://github.com/php/php-src/blob/master/ext/standard/tests/strings/str_pad_variation1.phpt">a
    PHP str_pad test</a>
function_description_template: >-
  Here’s what our current JavaScript equivalent to <a
  href="https://php.net/manual/en/function.[functiondashed].php">[language]'s
  [function]</a> looks like.
alias:
  - /categories/
  - /categories/array/
  - /categories/bc/
  - /categories/ctype/
  - /categories/datetime/
  - /categories/exec/
  - /categories/filesystem/
  - /categories/funchand/
  - /categories/i18n/
  - /categories/index/
  - /categories/info/
  - /categories/json/
  - /categories/math/
  - /categories/misc/
  - /categories/net/
  - /categories/network/
  - /categories/pcre/
  - /categories/strings/
  - /categories/url/
  - /categories/var/
  - /categories/xdiff/
  - /categories/xml/
  - /functions/index/
  - /functions/
  - /packages/
  - /packages/index/
warning: 'This file is auto generated by `npm run web:inject`, do not edit by hand'
type: language
layout: language
language: php
title: PHP extensions  in JavaScript
---
